package com.myspring.sample.autowired;

import com.myspring.sample.model.mult_impl.MyInterface;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

@Component
public class MyService {
    @Autowired
    @Qualifier("myInterface1")
    MyInterface bean;

    @Autowired
    MyInterface myInterface2;

    public void call() {
        System.out.println(bean.getClass().getName());
    }
}
